package com.ruoyi.wareManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wareManagement.mapper.InventoryJournalInquiryMapper;
import com.ruoyi.wareManagement.domain.InventoryJournalInquiry;
import com.ruoyi.wareManagement.service.IInventoryJournalInquiryService;

/**
 * 库存流水查询Service业务层处理
 * 
 * @author admin
 * @date 2024-07-01
 */
@Service
public class InventoryJournalInquiryServiceImpl implements IInventoryJournalInquiryService 
{
    @Autowired
    private InventoryJournalInquiryMapper inventoryJournalInquiryMapper;

    /**
     * 查询库存流水查询
     * 
     * @param journalId 库存流水查询主键
     * @return 库存流水查询
     */
    @Override
    public InventoryJournalInquiry selectInventoryJournalInquiryByJournalId(Long journalId)
    {
        return inventoryJournalInquiryMapper.selectInventoryJournalInquiryByJournalId(journalId);
    }

    /**
     * 查询库存流水查询列表
     * 
     * @param inventoryJournalInquiry 库存流水查询
     * @return 库存流水查询
     */
    @Override
    public List<InventoryJournalInquiry> selectInventoryJournalInquiryList(InventoryJournalInquiry inventoryJournalInquiry)
    {
        return inventoryJournalInquiryMapper.selectInventoryJournalInquiryList(inventoryJournalInquiry);
    }

    /**
     * 新增库存流水查询
     * 
     * @param inventoryJournalInquiry 库存流水查询
     * @return 结果
     */
    @Override
    public int insertInventoryJournalInquiry(InventoryJournalInquiry inventoryJournalInquiry)
    {
        inventoryJournalInquiry.setCreateTime(DateUtils.getNowDate());
        return inventoryJournalInquiryMapper.insertInventoryJournalInquiry(inventoryJournalInquiry);
    }

    /**
     * 修改库存流水查询
     * 
     * @param inventoryJournalInquiry 库存流水查询
     * @return 结果
     */
    @Override
    public int updateInventoryJournalInquiry(InventoryJournalInquiry inventoryJournalInquiry)
    {
        return inventoryJournalInquiryMapper.updateInventoryJournalInquiry(inventoryJournalInquiry);
    }

    /**
     * 批量删除库存流水查询
     * 
     * @param journalIds 需要删除的库存流水查询主键
     * @return 结果
     */
    @Override
    public int deleteInventoryJournalInquiryByJournalIds(Long[] journalIds)
    {
        return inventoryJournalInquiryMapper.deleteInventoryJournalInquiryByJournalIds(journalIds);
    }

    /**
     * 删除库存流水查询信息
     * 
     * @param journalId 库存流水查询主键
     * @return 结果
     */
    @Override
    public int deleteInventoryJournalInquiryByJournalId(Long journalId)
    {
        return inventoryJournalInquiryMapper.deleteInventoryJournalInquiryByJournalId(journalId);
    }
}
